package com.yzp.controller;

import com.yzp.service.TranTest2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * Description
 *
 * @className: OrderController
 * @author: yanzhouping
 * @date: 2019/9/2 15:19
 */
@RestController
public class OrderController {

    @Autowired
    private TranTest2Service tranTest2Service;

    @GetMapping("/order")
    public Map testThreadPool() throws InterruptedException {
        tranTest2Service.sendMessage1(); // 发短信的方法   1
        tranTest2Service.sendMessage2(); // 发短信的方法  2
        Map map = new HashMap();
        map.put("id", "12");
        map.put("username", "jack");
        for (int i = 0; i < 20; i++) {
            System.out.println(i);
        }
        return map;
    }
}
